<template>
  <div class="rank-card-item">
    <div class="rank-card-item-wrap">
      <div class="item-img">
        <img :src="src" />
      </div>
      <div class="item-content">
        <div class="item-content-title">{{ title }}</div>
        <div class="item-content-status">{{ status }}</div>
      </div>
    </div>
  </div>
</template>

<script lang="ts">
import { defineComponent, computed } from 'vue'

import { rankCardItemProps } from './props'

export default defineComponent({
  props: rankCardItemProps,
  setup(props) {
    const src = computed(() => props.src)
    const title = computed(() => props.title)
    const status = computed(() => props.status)

    return {
      src,
      title,
      status
    }
  }
})
</script>

<style scoped lang="less">
.rank-card-item {
  width: 100%;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  &:hover {
    cursor: pointer;
    background: #f5f5f5;
  }
  .rank-card-item-wrap {
    width: 80%;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    .item-img {
      width: 40px;
      height: 40px;
      img {
        width: 100%;
        height: 100%;
      }
    }
    .item-content {
      flex: 1;
      height: 120%;
      display: flex;
      flex-direction: column;
      justify-content: space-around;
      align-items: flex-start;
      font-size: 12px;
      transform: scale(0.8);
      .item-content-status {
        color: #999999;
      }
    }
  }
}
</style>
